const { createApp, reactive } = Vue;
const { ElMessage } = ElementPlus;

const app = createApp({
    setup() {
        const form = reactive({
            name: '',
            region: '',
            date1: '',
            date2: '',
            delivery: false,
            type: [],
            resource: '',
            desc: ''
        });

        const onSubmit = () => {
            console.log('submit!', form);
            ElMessage({
                message: '提交成功',
                type: 'success'
            });
        };

        return { form, onSubmit };
    }
})


app.use(ElementPlus)



for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app');